<template>
    <div class="entry">
        <!-- 文案信息输入框 -->
        <van-cell-group>
            <van-field
                v-for="(item,index) of entryInfo" :key="index"
                v-model="item.data"
                clearable
                :label="item.label"
                :placeholder="item.placeholder"
            />
        </van-cell-group>
        <!-- 营业执照上传区 -->
        <div class="license">
            <p>营业执照（新三证）</p>
            <van-uploader v-model="fileList" multiple />
        </div>
        <div class="license">
            <p>门户照</p>
            <van-uploader v-model="fileList" multiple />
        </div>
        <div class="license">
            <p>法人身份证正反面</p>
            <van-uploader v-model="fileList" multiple />
        </div>
        <!-- 协议 -->
        <div class="agreement">
            <van-checkbox v-model="checked"  shape="square" checked-color="#FD4C4C" @click="check">我已知晓并同意宸品汇相关合作协议</van-checkbox>
            <!-- <span></span> -->
        </div>
        <div class="btn">
            <van-button type="danger" size="large" is-link @click="showPopup">确认提交</van-button>
            <van-popup v-model="show">
                <div class="msg">
                    <div class="title">
                        <span>提示信息</span>
                        <div @click="hidePopup">
                            <img src="@assets/imgs/关闭.png" />
                        </div>
                    </div>
                    <div class="content">审核提交成功，请等待后台审核<br>我们将尽快处理</div>
                </div>
                <van-button type="danger" size="large" @click="data">确认</van-button>
            </van-popup>
        </div>
    </div>
</template>
<script>
import { Field,Uploader,Button,Popup,Checkbox, CheckboxGroup } from 'vant';
export default {
    data(){
        return {
            checked:true,
            show:false,
            fileList: [
                { url: 'https://img.yzcdn.cn/vant/leaf.jpg', isImage: true }
                // Uploader 根据文件后缀来判断是否为图片文件
                // 如果图片 URL 中不包含类型信息，可以添加 isImage 标记来声明
            ],
            entryInfo:[
                {
                    label:"店家名称",
                    placeholder:"请输入店家名称",
                    data:""
                },{
                    label:"所属城市",
                    placeholder:"请选择所属城市",
                    data:""
                },{
                    label:"店家地址",
                    placeholder:"请输入门店详情地址",
                    data:""
                },{
                    label:"主营产品",
                    placeholder:"请输入主营产品",
                    data:""
                },{
                    label:"客服电话",
                    placeholder:"请输入客服电话",
                    data:""
                },{
                    label:"联系人姓名",
                    placeholder:"请输入联系人姓名",
                    data:""
                }
            ]
        }
    },
    methods:{
        showPopup(){
            this.show=true;
        },
        hidePopup(){
            this.show=false;
        },
        data(){
            this.hidePopup();
            // 向后台提交数据...
        },
        check(){
            if(this.checked===true){
                this.checked=false;
            }else{
                this.checked=true;
            }
        }
    }
}
</script>
<style scoped>

</style>